#include "main.h"
#include "tim.h"
void breathLED_init(void)
{
    HAL_TIM_Base_Start(&htim3);
    HAL_TIM_PWM_Start(&htim3,TIM_CHANNEL_1);
    __HAL_TIM_SetCounter(&htim3,0);
}
void breathLED_work(void)
{
    int8_t i;
    for(i=0;i<100;i++)
    {
        __HAL_TIM_SetCompare(&htim3,TIM_CHANNEL_1,i);
        HAL_Delay(10);
    }
    for(i=99;i>0;i--)
    {
        __HAL_TIM_SetCompare(&htim3,TIM_CHANNEL_1,i);
        HAL_Delay(10);
    }

}
